import api from './index'
import { axios } from '@/utils/request'
import Qs from 'qs'

export function getDepartmentList(parameter) {
  return axios({
    url: api.GetDepartmentList,
    method: 'get',
    params: parameter
  })
}
export function saveDepartment(parameter) {
  return axios({
    url: api.SaveDepartment,
    method: 'post',
    data: Qs.stringify(parameter)
  })
}
export function deleteDepartment(parameter) {
  return axios({
    url: api.DeleteDepartment,
    method: 'post',
    data: parameter
  })
}
export function deleteDepartments(parameter) {
  return axios({
    url: api.DeleteDepartments,
    method: 'post',
    data: parameter
  })
} 

export function getDepartmentByTypeSettings(parameter) {
  return axios({
    url: api.GetDepartmentByTypeSettings,
    method: 'get',
    params: parameter
  })
}

export function getDepartmentByType(parameter) {
  return axios({
    url: api.GetDepartmentByType,
    method: 'get',
    params: parameter
  })
}
export function getDepartmentById(parameter) {
  return axios({
    url: api.GetDepartmentById,
    method: 'get',
    params: parameter
  })
}
export function getReceiveDepartments() {
  return axios({
    url: api.GetReceiveDepartments,
    method: 'get'
  })
}